<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns="http://purl.org/rss/1.0/">
  <channel>
    <title><?php e($sitename);?>: News</title>
    <link><?php e($siteurl);?></link>
    <description><?php e($sitename);?>'s Newsfeed</description>
    <language>en-gb</language>
    <pubDate><?php echo date("D, j M Y H:i:s", gmmktime()) . ' GMT';?></pubDate>
    <generator>Web Rocket</generator>
	<?php foreach ($posts as $post): ?>
	<item>
	<title><?php echo $post['Post']['title']; ?></title>
	  <link><?php e($siteurl);?>/posts/view/<?php e($post['Post']['url']);?></link>
	  <guid><?php e($siteurl);?>/posts/view/<?php e($post['Post']['url']);?></guid>
	  <dc:creator><?php e($post['User']['username']);?></dc:creator>
	  <description><![CDATA[<?php e($post['Post']['byline']);?>]]></description>
	  <pubDate><?php echo $time->nice($time->gmt($post['Post']['created'])) . ' GMT'; ?></pubDate>
    </item>
    <?php endforeach; ?>
  </channel>
</rss>